apt update && apt install -y supervisor python3-venv git memcached lsof openssh-server
service supervisor start
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

# config ssh


mkdir -p /root/workspace/main_code
cd /root/workspace/main_code
git clone https://gitee.com/lovely_quantum/shenzhen-backend.git .
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -U pip
pip install -r requirements.txt
deactivate

mkdir -p /root/workspace/web_service
cd /root/workspace/web_service
git clone https://gitee.com/lovely_quantum/shenzhen-web.git .
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -U pip
pip install -r requirements.txt
deactivate

cp /root/workspace/main_code/services/detection_system.conf /etc/supervisor/conf.d
supervisorctl reread
supervisorctl reload
